package com.mmp.main.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * The persistent class for the hospital_device_scrapping_info database table.
 *
 */
@Entity
@Table(name = "hospital_device_scrapping_info")
@NamedQuery(name = "HospitalDeviceScrappingInfo.findAll", query = "SELECT h FROM HospitalDeviceScrappingInfo h")
public class HospitalDeviceScrappingInfo implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Basic(optional = false)
	private Integer id;

	@OneToOne(cascade = CascadeType.MERGE)
	@JoinColumn(name = "device_id")
	private HospitalDevice hospitalDevice;

	@Column(name = "device_condition")
	private String deviceCondition;

	@ManyToOne
	@JoinColumn(name = "scrapping_reason_id")
	private LookupScrappingReason scrappingReason;

	@Column(name = "scrapping_reason_report_url")
	private String scrappingReasonReportUrl;

	@Column(name = "scrapping_final_report_url")
	private String scrappingFinalReportUrl;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "scrapping_date")
	private Date scrappingDate;

	@ManyToOne
	@JoinColumn(name = "created_by")
	private User createdBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_in")
	private Date createdIn;

	public HospitalDeviceScrappingInfo() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public HospitalDevice getHospitalDevice() {
		return hospitalDevice;
	}

	public void setHospitalDevice(HospitalDevice hospitalDevice) {
		this.hospitalDevice = hospitalDevice;
	}

	public String getDeviceCondition() {
		return deviceCondition;
	}

	public void setDeviceCondition(String deviceCondition) {
		this.deviceCondition = deviceCondition;
	}

	public LookupScrappingReason getScrappingReason() {
		return scrappingReason;
	}

	public void setScrappingReason(LookupScrappingReason scrappingReason) {
		this.scrappingReason = scrappingReason;
	}

	public String getScrappingReasonReportUrl() {
		return scrappingReasonReportUrl;
	}

	public void setScrappingReasonReportUrl(String scrappingReasonReportUrl) {
		this.scrappingReasonReportUrl = scrappingReasonReportUrl;
	}

	public String getScrappingFinalReportUrl() {
		return scrappingFinalReportUrl;
	}

	public void setScrappingFinalReportUrl(String scrappingFinalReportUrl) {
		this.scrappingFinalReportUrl = scrappingFinalReportUrl;
	}

	public Date getScrappingDate() {
		return scrappingDate;
	}

	public void setScrappingDate(Date scrappingDate) {
		this.scrappingDate = scrappingDate;
	}

	public User getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(User user) {
		this.createdBy = user;
	}

	public Date getCreatedIn() {
		return createdIn;
	}

	public void setCreatedIn(Date createdIn) {
		this.createdIn = createdIn;
	}

}
